import request from '@/utils/request'

// 查询新开课列表
export function listCourse(query) {
  return request({
    url: '/xinke/course/list',
    method: 'get',
    params: query
  })
}

// 查询新开课详细
export function getCourse(newCourseId) {
  return request({
    url: '/xinke/course/' + newCourseId,
    method: 'get'
  })
}

// 新增新开课
export function addCourse(data) {
  return request({
    url: '/xinke/course',
    method: 'post',
    data: data
  })
}

// 修改新开课
export function updateCourse(data) {
  return request({
    url: '/xinke/course',
    method: 'put',
    data: data
  })
}

// 删除新开课
export function delCourse(newCourseId) {
  return request({
    url: '/xinke/course/' + newCourseId,
    method: 'delete'
  })
}
